<template>
	<view>
		<view class="container dflex alc jcsb pl40 pr40">
			<!-- 左边 -->
			<view class="left dflex alc">
				<view class="img dflex alc jcc">
					<image :src="data.img" mode="widthFix"></image>
				</view>
				<view class="text dflex flexc jcsa ml20">
					<view class="fs28 black fw900">{{data.name}}</view>
					<view class="fs28 red fw900">￥{{data.price}}</view>
				</view>
			</view>
			<!-- 右边 -->
			<view class="right fs22 fw500 gray">库存：{{data.stock}}</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'CenterData',
	props:['data'],
	data() {
		return {};
	}
};
</script>

<style lang="scss">
.container {
	.left {
		.img {
			width: 130rpx;
			height: 130rpx;
			background: #e6f4fc;
			border-radius: 20rpx 20rpx 20rpx 20rpx;
			image {
				width: 126rpx;
				height: 126rpx;
			}
		}
		.text{
			height: 130rpx;
		}
	}
}
</style>
